package it.sciuto.criminal.activities;

import it.sciuto.criminal.R;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class HomeActivity extends Activity {
	ImageButton writeButton;
	ImageButton folderButton;
	ImageButton infoButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.home);

		// Fade Animation
		overridePendingTransition(R.anim.fadein, R.anim.fadeout);

		// Orientation
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

		writeButton = (ImageButton) findViewById(R.id.write_button);
		writeButton.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				Intent myIntent = new Intent(getBaseContext(), LetterActivity.class);
				startActivity(myIntent);
			}
		});

		folderButton = (ImageButton) findViewById(R.id.folder_button);
		folderButton.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				Intent myIntent = new Intent(getBaseContext(), FolderActivity.class);
				startActivity(myIntent);
			}
		});

		infoButton = (ImageButton) findViewById(R.id.info_button);
		infoButton.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				Intent myIntent = new Intent(getBaseContext(), TutorialActivity.class);
				startActivity(myIntent);
			}
		});
	}

}
